program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a, b, c, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5 : integer;
  dp, d : real;


begin
  readln(y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, x5, y5, z5);
  a:=(y1-y2)*(z2-z3)-(z1-z2)*(y2-y3);
  b:=-((x1-x2)*(z2-z3)-(x2-x3)*(z1-z2));
  c:=(x1-x2)*(y2-y3)-(x2-x3)*(y1-y2);
  d:=-(ax1+by1+cz1);
  if (a*x4+b*y4+c*z4 = a*x5+b*y5+c*z5) then
    dp:=(a*x5+b*y5+c*z5+d) else
    dp:=0;
  writeln(dp:0:4);
end.
